package channelService

import (
	"gitee.com/fierce_wolf/gos7"
	"sync"
)

type ConnectManager struct {
	key2ctx sync.Map
}

func (e *ConnectManager) getContextByServiceKey(serviceKey string) gos7.Client {
	val, ok := e.key2ctx.Load(serviceKey)
	if !ok {
		return nil
	}

	return val.(gos7.Client)
}
